package com.example.tome.module_mvp_home.presenter;

import com.example.tome.component_router.retrofit.DataManager;
import com.example.tome.component_router.retrofit.RxUtils;
import com.example.tome.component_router.retrofit.bean.BaseObj;
import com.example.tome.component_router.retrofit.bean.LoginBean;
import com.example.tome.component_router.retrofit.bean.LoginResponse;
import com.example.tome.component_router.retrofit.params.LoginParams;
import com.example.tome.module_base.base.BaseObserver;
import com.example.tome.module_base.base.BasePresenter;
import com.example.tome.module_mvp_home.contract.LoginContract;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @Created by TOME .
 * @时间 2018/5/4 11:03
 * @描述 ${登录preshenter}
 */

public class LoginPresenter extends BasePresenter<LoginContract.View> implements LoginContract.Presenter{

    private DataManager mDataManager;

    @Inject
    LoginPresenter(DataManager dataManager){
        this.mDataManager = dataManager;
    }

    @Override
    public void attachView(LoginContract.View view) {
        super.attachView(view);

    }

    @Override
    public void getLoginData(LoginParams params) {
      /* addSubscribe(mDataManager.getFeedArticleList(params)
       .compose(RxUtils.<LoginResponse>rxSchedulerHelper())
       .subscribe(new BaseObserver<LoginResponse>(mView) {
           @Override
           public void onNext(LoginResponse loginResponse) {
               mView.showLoginData(loginResponse);
           }
       }));*/

    }
}
